<template>
  <div>
    <page-list :x-uri="uri" :custom-components="custom" :doactions="doactions" :checkbox-item="false">
      <!-- 自定义tab -->
      <template v-slot:page-tabs>
        <tabs />
      </template>
    </page-list>
  </div>
</template>

<script>
import PageList from '@public/template/page_list.vue';
import Status from './components/status';
import User from './components/user';
import Tabs from './tabs';
import VipStatus from './components/vip_status.vue';
export default {
  components: {
    PageList,
    Tabs
  },
  inject: ['reload'],
  data() {
    return {
      uri: '/user/admin/account/vip/list',
      custom: {
        status: Status,
        user: User,
        vip_status: VipStatus
      },
      doactions: [{ title: '编辑', meta: { permission: 'user.student.vip.edit' }, callback: this.edit }]
    };
  },
  methods: {
    edit: function({ row }) {
      this.$router.push({ path: '/user/student/vip/' + row.id + '/edit' });
    }
  }
};
</script>
